Skip to content

feat(sensitive): Home Assistant, and the 99→20 rule scoped to the Hue bridge (#134) - #427

Merged
Gerrrt merged 2 commits into
mainfrom
gerrrt/home-assistant-sensitive-tier-23027c
Sep 10, 2026
Merged

Gerrrt merged 2 commits into
mainfrom
gerrrt/home-assistant-sensitive-tier-23027c

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Refs #134 (left open: the rule and the deploy wait on #404). Related: #404, ADR-0032, ADR-0019.

What this adds

  • stacks/sensitive/: Home Assistant as the third service and the first household one — Container flavour, expose: only, behind Caddy at homeassistant.matrix.elysium. Not network_mode: host, not privileged: discovery is mDNS/SSDP and link-local, and every device it controls is on Skids, a VLAN away. cap_drop: [ALL], no-new-privileges, read-only root, two tmpfs mounts, init: false (s6-overlay refuses to be anything but PID 1 — measured), 1 GiB ceiling.
  • home-assistant/configuration.yaml mounted read-only over the state volume; automations are YAML in packages/, not the UI editor, because !include automations.yaml fails hard on a file this repository does not ship. http.trusted_proxies names Caddy, which now has a fixed address (172.28.99.2) on a fixed subnet for that one line.
  • ADR-0035 scopes the 99 → 20 row ADR-0008 wrote. Read against network.md's Skids table, one device has a local API — bifrost, the Hue bridge. Ring, the Echos, the HomePods, the litter robot and the Tuya machine are cloud or nothing. So the pass is 10.0.99.40 → 10.0.20.104:80,443/tcp (80 for aiohue's pairing probe, 443 for everything after — read from the code), inserted above Block access to Skids beside the SNMP passes. network.md, security.md and roadmap.md carry it as decided, not created.
  • The credential deviation, on the record: Home Assistant writes the Hue key, the Ring token and everything a config flow produces into /config/.storage; nothing rendered from SOPS can hand them in. The ADR, compose.yaml, security.md's Secrets section and secrets/sensitive.example.yaml all say so and say what protects them instead.

What was measured

  • On morpheus, 2026-09-09: Winterfell's Block access to Skids sits above its egress pass with the three SNMP/HTTP passes above it, so the rule is an insertion, as the roadmap said. Skids has zero DHCP reservations and a .100–.200 pool holding every device on the segment — the Hue bridge is at .104 by lease. A reservation is the precondition ADR-0035 puts before the rule.
  • The pinned image, booted on the monitoring host with the exact compose.yaml hardening on an internal Docker network: onboarding served in ~20 s, CapEff 0 for PID 1 and the HA process, 316 MiB RSS, 35 tasks, zero read-only errors. Two findings kept in the file: /run must be exec (Docker's tmpfs default is noexec; s6 stages its binaries there), and the dhcp discovery integration logs one Operation not permitted line per start wanting CAP_NET_RAW — it would sniff nothing on a bridge a VLAN from every device, so the capability stays dropped and the line is documented as expected.
  • make validate passes locally (the three skips are the usual not-the-deploy-checkout ones); pin-digests agrees with the digest; caddy validate and caddy fmt pass on the new route.

Left for #404 (and why #134 stays open)

  1. A Kea reservation for bifrost at 10.0.20.104 — the first on Skids.
  2. The pass itself, in the same sitting, above Block access to Skids; then read the TerminalSegmentReachedInternalNetwork cannot fire — the firewall logs blocks only #223 tripwire counter, which must not move.
  3. --dns homeassistant.matrix.elysium on trinity's leaf and a host override on morpheus; both commands are in the stack README.
  4. TOTP at first login (Build the sensitive-tier host on the ProDesk (ADR-0034) #404 step 6).

Security review

  • Does not weaken the default-deny posture between VLANs — it narrows the row ADR-0008 authorised from a segment to one host on two ports, in the safe direction, and the rule is documented before it exists (Write a superseding ADR: 0002 says two inter-VLAN rules, there are three #104's lesson). Nothing in docs/firewall-claims.yaml changes: the wholesale posture is untouched.
  • Any new credential goes in secrets/*.sops.yaml — none is added; the one class that cannot is recorded in ADR-0035 rather than papered over.
  • Any new device is added to docs/network.md with an OUI-truncated MAC — no new device; no coordinator or bridge is needed.

🤖 Generated with Claude Code

… bridge (#134)

Home Assistant joins stacks/sensitive as the first household service behind
Caddy: the Container flavour (no Supervisor, no add-ons), an ordinary member
of the tier's network with expose: and no ports:, not network_mode: host —
discovery is link-local and every device it controls is a VLAN away. Root
because the image has no other mode, bounded by cap_drop ALL, a read-only
root and two tmpfs mounts; init: false because s6-overlay refuses to be
anything but PID 1. Booted so on the monitoring host from the pinned digest:
onboarding served, CapEff 0, 316 MiB RSS, 35 tasks; /run has to be exec.

configuration.yaml is mounted read-only over the state volume and loads a
packages/ directory rather than the UI editor's automations.yaml, whose
include fails hard on a file that does not exist. Caddy gets a fixed address
on a fixed subnet so trusted_proxies can name it.

ADR-0035 scopes the rule ADR-0008 wrote as 99 → 20. Read against the Skids
inventory, one device has a local API — the Hue bridge; everything else is
reached through a vendor's cloud or not at all — so the pass is
10.0.99.40 → 10.0.20.104:80,443/tcp, the two ports aiohue uses, inserted
above Block access to Skids beside the SNMP passes. Skids has no DHCP
reservations and its pool holds the bridge's address, so a reservation is
the precondition; the rule is created under #404 once trinity exists.

The ADR also records the one place the tier steps outside SOPS: Home
Assistant writes the credentials it obtains into its own store in the
volume, and nothing this repository renders can hand them in.

Refs #134, #404, #98, #149.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit 2df2d4e into main Sep 10, 2026
3 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/home-assistant-sensitive-tier-23027c branch September 10, 2026 05:14
Gerrrt added a commit that referenced this pull request Sep 10, 2026
Home Assistant (#427, #134) landed in stacks/sensitive under this branch.
Resolved on main's versions: the compose header counts two household
services and eight DIFFERENCEs (Paperless-ngx's CPU ceiling and writable
root become 7 and 8; its `init: false` lines point at Home Assistant's
DIFFERENCE 5), the Paperless block sits after Home Assistant's, Caddy's
`make certs` line carries both names, the Caddyfile keeps main's routing
preamble with the Paperless block above the catch-all, the secrets template
names four keys and Home Assistant's none, and the README merges both
services' notes. backup-volumes.sh also gains a sentinel for
home-assistant-config — ./.HA_VERSION, read off a boot of the pinned image
— because the merged stack's backup would otherwise refuse on that volume.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Gerrrt added a commit that referenced this pull request Sep 10, 2026
#427 (Home Assistant, the Hue-bridge rule) and #431 (SNMPv3 per poll) each
added an ADR-0035 on separate branches and both merged on 2026-09-09, #431
second. check_docs.py's numbering assertion now fails on main and on every
PR that merges it. The one that landed second moves, as the check says:
the file, its H1, every link and every bare mention that is about SNMPv3.
The Hue-bridge references stay at 0035. README's ADR count goes to 36.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 06d0e77)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant